<template>
    <div>
        <div v-for="(item,index) in comments" :key="index">
            {{item.user}} : {{item.content}}
        </div>
    </div>
</template>

<script>
    export default {
        name: "comment",
        props:['cid'],
        data() {
            return {
                comments: [
                    {id: 0, user: '某某某', content: '我评价了。。。。'},
                    {id: 1, user: '某某某', content: '我评价了。。。。'},
                    {id: 2, user: '某某某', content: '我评价了。。。。'},
                    {id: 3, user: '某某某', content: '我评价了。。。。'},
                    {id: 4, user: '某某某', content: '我评价了。。。。'},
                    {id: 5, user: '某某某', content: '我评价了。。。。'},
                    {id: 6, user: '某某某', content: '我评价了。。。。'},
                    {id: 7, user: '某某某', content: '我评价了。。。。'},
                    {id: 8, user: '某某某', content: '我评价了。。。。'}
                ]
            }
        },
        created() {
            let page=this.$route.query.page || '1'
            this.$axios.get('getComments/${this.cid}?page=${page}')
                .then(res=>{

                }).catch(err=>{

            })
        }
    }
</script>

<style scoped>

</style>